<%-- 
    Document   : demo_database
    Created on : Jan 9, 2013, 7:41:01 PM
    Author     : kk
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.sql.*, java.io.*"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
        try{
            Class.forName("com.mysql.jdbc.Driver");
            Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/shms", "root", "");
            Statement stmt=con.createStatement();
            ResultSet rs=stmt.executeQuery("select * from employee_master ");
            while(rs.next())
            {
                %>
                <%= rs.getString(1) %> <br/>
                <%= rs.getString(2) %> <br/>
                <%= rs.getString(3) %> <br/>
             <%  
            }
        }
        catch(Exception e) {}
        %>
    </body>
</html>
